package com.fcscs.ecms.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.fcscs.core.dao.Dao;
import com.fcscs.cservice.domain.MainMenuItem;
import com.fcscs.cservice.domain.model.MainMenuItemView;
import com.fcscs.cservice.ws.schema.common.MenuListView;
import com.fcscs.cservice.ws.schema.common.PictureFrameView;
@Repository
public interface ECMSMainMenuDao extends Dao {

	/**
	 * @param id
	 * @return
	 */
	MainMenuItem getMainMenuItem(long id);
	
	/**
	 * @param orgId
	 * @param propId
	 * @param isCurrent
	 * @return
	 */
	List<MainMenuItem> getMainMenuItemList(long orgId, long propId, boolean isCurrent); //isCurrent true: current; false: scheduled

	/**
	 * @param orgId
	 * @param propId
	 * @param versionId
	 * @return
	 */
	List<MainMenuItem> getMainMenuItemList(long orgId, long propId, long versionId); //get specified version data

	/**
	 * @param mmiList
	 * @return
	 */
	List<MainMenuItem> saveMainMenuItemList(List<MainMenuItem> mmiList); //used to save display order

	/**
	 * @param mmi
	 * @return
	 */
	MainMenuItem createMainMenuItem(MainMenuItem mmi);

	/**
	 * @param mmi
	 * @return
	 */
	MainMenuItem saveMainMenuItem(MainMenuItem mmi);
	
	/**
	 * @param mmi
	 * @return
	 */
	boolean deleteMainMenuItem(MainMenuItem mmi);

	/**
	 * @param mmi
	 * @return
	 */
	boolean permDeleteMainMenuItem(MainMenuItem mmi);
	
	/**
	 * @param orgId
	 * @param propId
	 * @param menuType
	 * @param id
	 * @param versionId
	 * @return
	 */
	boolean isMainMenuItemTaken(long orgId, long propId, String menuType, Long id, long versionId);

	/**
	 * @param orgId
	 * @param propId
	 * @return
	 */
	List<MainMenuItemView> getMainMenuItemViewList(long orgId, long propId); //used by web service, get current version
	
	/**
	 * getPictureFrameViews method for all Services
	 * @param orgId , propId , frameId
	 * @return pictureFrameView 
	 */
	PictureFrameView getPictureFrameViews(long orgid , long propId , long id);
	
	/**
	 * getPictureFrameViews method for MainMenuService
	 * @param orgId , propId
	 * @return pictureFrameView 
	 */
	PictureFrameView getPictureFrameViews(long orgid , long propId ,int type);
	
	/**
	 * getMenuListViews method for MainMenuService
	 * @param orgId , propId , languageId 
	 * @return list of MenuListView 
	 */	
	List<MenuListView> getMenuListViews(long orgId , long propId , String langId);
	
	/**
	 * getMenuListViews method for MainMenuService (MASTER)
	 * @param orgId , propId , languageId 
	 * @return list of MenuListView 
	 */	
	List<MenuListView> getMasterMenuListViews(long orgId, long propId,
			String langId);

	
	
}
